﻿using SpaceNeedle.City6473.Web.Data.Models;
using SpaceNeedle.SDK.Web.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SpaceNeedle.City6473.Web.Data.Repositories
{
    public class StatusRepository 
    {
        protected List<Status> Statuses { get; set; }
        
        public StatusRepository()
            
        {
            this.Statuses = new List<Status>();
            this.Statuses.Add(new Status() { Id = 0, Name = "Aberto" });
            this.Statuses.Add(new Status() { Id = 1, Name = "Em Andamento" });
            this.Statuses.Add(new Status() { Id = 2, Name = "Fechado com solução" });
            this.Statuses.Add(new Status() { Id = 3, Name = "Fechado sem solução" });
        }

        public List<Status> GetAll()
        {
            return Statuses;
        }

        public Status GetById(int id)
        {
            return this.GetAll().Where(x => x.Id == id).SingleOrDefault();
        }
    }
}
